package domain;

import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;

public class SingletonSessionFactory {
	private static SessionFactory sessionFactory;
			
	//ne pas oublier cette appel dans le "init"
	public static SessionFactory getSessionFactory(){
		if(sessionFactory==null){
			sessionFactory=new Configuration().configure().buildSessionFactory();
		}
		return sessionFactory;
	}

}
